<!doctype html>
<html>
  <head>
    <meta charset="UTF-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
    <title></title>
    <link rel="stylesheet" type="text/css" href="../css/api.css" />
    <link rel="stylesheet" type="text/css" href="../css/common.css" />    
    <style>     
     /* 头部样式 */
     .topbar { height:50px; }
     #title { color:#FFF;} 
     .swipe {line-height: 50px;margin-right: 10px;color: #FF8400;}
     .back {float: left; padding-right: 30px;}
     .back img {height: 30px;margin-top: 10px;margin-left: 10px;margin-bottom: 10px;}
     .topbar .title {line-height: 50px; font-size: 22px; position: absolute; left: 50%; -webkit-transform: translateX(-50%);transform: translateX(-50%);}
     .right {float: right; padding-left: 30px;}
     .right img {height: 30px;margin-top: 10px;margin-right: 10px;margin-bottom: 10px;}  
     
     .item { width:90%; margin:0 5%;position: relative; height:40px; margin-top:4px; line-height:40px;}
  
	.email{-webkit-border-radius: 5px;  border: 1px solid #999999;background: #fff;}
	.email img {width: 25px; float:right; margin-top: 8px; margin-left: 5px; margin-right: 2%;vertical-align: top;}
   
   
   .h80 {height: 80px;}
		.h40 {height: 40px;}
		.h20 {height: 20px;}
    	 
		.h1 {height: 1px;margin-left: 15px;background: #f0f0f0;}
		.fr {float: right;}
		.fl {float: left;}
		.hightitem {background-color: #fff;}

		 
		/* 选项卡 */
		.tabbar {text-align: center;}
		/* 猜你喜欢 */
		.guesstitle {height: 40px;line-height: 40px;padding-left: 10px;vertical-align: top; font-size: 12px;color: #999;}
		.guesstitle img {height: 15px;padding-top: 12px; padding-left: 10px;}
		.home-tuan-list .item {position: relative; display: block; padding-left: 10px; height: auto;border-bottom: 1px solid #e0e0e0;}
		.home-tuan-list .cnt { display: box; display: -webkit-box; min-height: 78px;  background-size: auto 1px; }
		.home-tuan-list .pic {margin-right: 10px; background: center; }
		.home-tuan-list img {width: 90px; height: 66px; margin-top: 7px; margin-bottom: 5px; border-radius: 3px; }
		.home-tuan-list .wrap {-webkit-box-flex: 1; }
		.home-tuan-list .wrap2 {display: table; height: 88px; width: 100%; }
		.home-tuan-list .content {-webkit-box-flex: 1; box-flex: 1; display: table-cell; vertical-align: middle; }
		.home-tuan-list .shopname {color: #333; /*line-height: 16px;*/ font-size: 1.4em;  padding-bottom: 2px; padding-top: 3px; display: inline-block;}
		.home-tuan-list .title {background-color: #f0f0f0;color: #666; line-height: 22px; font-size: 1em; margin: 15px 0; overflow: hidden; padding-top: 3px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
		.home-tuan-list .title>span{ color: #2E8AE0;} 
		.home-tuan-list .hot-title {margin-bottom: 8px; }
		.home-tuan-list .hot-subtitle {margin-bottom: 9px; }
		.home-tuan-list .info {margin-top: 9px;/* margin-bottom: 11px;*/ color: #666; font-size: 12px; position: relative; line-height: 15px; display: box; display: -webkit-box; height: 15px; }
		.home-tuan-list .symbol {font-size: 1em; color: #666; display: block; margin-top: 1px; }
		.home-tuan-list .price {color: #666; font-size: 1em; line-height: 15px; margin-right: 5px; margin-top: 1px; position: absolute; right: 0;}
		.home-tuan-list .o-price {color: #666; margin-top: 5px; line-height: 10px; }
		.home-tuan-list .sale {color: #f63; border: solid 1px #ff916e; padding: 3px 2px 2px; font-size: 10px; border-radius: 2px; -webkit-border-radius: 2px; margin-left: 5px; line-height: 10px; height: 10px; }
		.home-tuan-list .distance {-webkit-box-flex: 1; box-flex: 1; -ms-box-flex: 1; -ms-flex: 1; text-align: right; line-height: 10px; margin-top: 5px; color: #999; float: right;font-size: 12px;}
		.home-tuan-list .price, .index-rec .home-tuan-list .o-price, .index-rec .home-tuan-list .distance, .index-rec .home-tuan-list .sale {display: block; line-height: 15px; font-size: 12px; }
		.Fix:after {display: block; content: ''; height: 0; clear: both; }
		#list1{ width:94%; margin-right:auto; margin-left:auto;}
		 #list1 .hightitem{ border-bottom:1px solid #cacaca; padding-bottom:10px;padding-top:20px;}
 

		/* 选项卡 */
		.active {color: #f60;}
		.indicator {height: 3px; width: 100%; background: #f60; position: absolute; bottom: 0;}
    </style>
  </head>
  <body>
    <div id="wrap">
      <!-- 第一头部 -->
     
      <div id="thridHeader" class="titlebar activebar">        
         <div class="whitebar">
          <div class="item email"><input id="keywords" name="keywords" type="text" placeholder="请输入要查找的内容" id="username"><img src="../image/btn/search.png" onclick="search()" tapmode="presshover"></div>         
         </div>          
       </div> 
       
     <div class="home-tuan-list" id="list1"></div> 
<input id="pageIndex" type="hidden" value="0"/>
<input id="access_token" type="hidden" value=""/>
<input id="admin_id" type="hidden" value=""/>  
    </div>
  </body>
<script type="text/javascript" src="../script/api.js"></script>
<script type="text/javascript" src="../script/api.data.js"></script>
<script type="text/javascript" src="../script/jquery.md5.js"></script>
<script type="text/javascript" src="../script/jquery.min.js"></script>
  <script type="text/javascript">
     // 完成首页初始化
    apiready = function(){
      //在页面制定位置输出接口所需的access_token和admin_id
            get_sign();   
      var thridHeader = $api.byId('thridHeader');
      $api.fixIos7Bar(thridHeader);
      var thridHeader = $api.offset(thridHeader);        
        // 第一次进入打开 默认显示每日要情
                var param = {}; 
                param.loadingImgae = 'widget://image/refresh.png';  //定义刷新小箭头的图片 
                param.bgColor = '#fff';  //定义下拉刷新区域的背景 
                param.textColor = '#000';  //定义下拉刷新提示文字的颜色 
                param.textDown = '下拉刷新...'; //定义下拉刷新文字 
                param.textUp = '松开刷新...'; //定义松开刷新文字 
                param.showTime = true;  //定义是否显示最后一次刷新时间
                 
                //下拉刷新
              api.setRefreshHeaderInfo(
               param,function(ret, err){  //refresh event callback 
                    $("#pageIndex").val(0);
                    $("#list1").html('');
                    search();
                    api.refreshHeaderLoadDone();
               }); 
               
              
              api.addEventListener({
                     name:"scrolltobottom"
              },function(ret,err){
                     search();
                     api.parseTapmode();
              });   
      
       
          
    };
   
   
   function search(){
      var keywords = document.getElementById("keywords").value;     
      search_more(keywords);
   } 
   
   function openDetail(message_id)
	{	    	   
		api.openWin({
           name: 'detailWin',
           url: './detailWin.html',
           rect:{
             x:0,
             y:0,
             w:'auto',
             h:'auto',
           },
           delay: 300,
           pageParam: {message_id:message_id},
           bounces: false,
           bgColor: 'rgba(0,0,0,0)',
           vScrollBarEnabled:true,
           hScrollBarEnabled:true
        });
	}
    
    function goback () {
      api.closeWin({name:'search'});
    }
    
   
  </script>
</html>